﻿@model IEnumerable<ConfigDashboard.Models.ConfigEnvironment>

@{
    ViewBag.Title = "Environments";
}

<h2>Environments</h2>

<p>
    @Html.ActionLink("« Back to List of Values", "Index", "Home") | 
    @Html.ActionLink("Create New Environment", "Create")
</p>

<table id="configtable">
    <tr>
        <th class="top-header"></th>
        <th class="top-header">Environment Name</th>
        <th class="top-header">View Order</th>
        <th class="top-header">Is Default?</th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            <a style="float: left; margin:3px;" class="ui-state-default ui-corner-all" href="@Url.Action("Delete", new { id = item.EnvironmentID })" title="Delete">
                <span class="ui-icon ui-icon-trash"></span>
            </a>
        </td>
        <td>
            <a href="@Url.Action("Edit", new { id = item.EnvironmentID })">
                @Html.DisplayFor(modelItem => item.EnvironmentName)
            </a>
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ViewOrder)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.IsDefault)
        </td>
    </tr>
}

</table>
